/*
 * @Author: 0x9DEFA478
 * @Date: 2025-06-21 20:25:36
 * @LastEditTime: 2025-09-20 22:22:23
 * @LastEditors: 0x9DEFA478
 * @Description: 
 * 
 */
#ifndef hC_ArgumentDecode_HPP_
#define hC_ArgumentDecode_HPP_
#include <string>
#include <vector>
#include <list>



namespace H{

  class ArgumentDecode{

    public:
      class Option{

        public:
          Option(const std::string& option)noexcept:isSet(false),valueValid(false),opt(option){}
          ~Option()noexcept=default;
        
          operator bool()const noexcept{return isSet;}

          bool IsSet()const noexcept{return isSet;}
          bool ValueValid()const noexcept{return valueValid;}
          const std::string& GetOption()const noexcept{return opt;}
          const std::string& GetValue()const noexcept{return value;}

        private:
          bool isSet;
          bool valueValid;

          const std::string opt;
          std::string value;

        friend class ArgumentDecode;
      };

    public:
      ArgumentDecode()noexcept;
      ArgumentDecode(const std::string EndArgMark)noexcept;
      ~ArgumentDecode()noexcept;

      void AddOption(Option* option);
      const std::vector<std::string>& GetRemanderArgument()noexcept;

      void Decode(int argc,const char* const* argv);

    private:
      const std::string EndArgMark;
      const bool Valid_EndArgMark;
      void* privateData;

  };
  
}




#endif //hC_ArgumentDecode_HPP_
